Home | Trees | Index | Help |
---|
Package i2p :: Module samclasses :: Class SAMTerminal |
|
Method Summary | |
---|---|
__init__(self,
addr,
msgobj)
| |
Polling loop for incoming messages. | |
Given a SAM command, returns (a, b), where a is the string at the beginning of the command, and b is a dictionary of name, value pairs for the command. | |
Raise an error if terminal was closed, otherwise do nothing. | |
Raises an error if kwargs['RESULT'] != 'OK'. | |
Close the SAM terminal. | |
Process a SAM message that was received. | |
Identical to q.get() unless a call to self.check() fails, in which case the waiting is cut short with an error. | |
Send a message to the SAM bridge. |
Method Details |
---|
_poll_loop(self)Polling loop for incoming messages. |
_samdecode(self, s)Given a SAM command, returns (a, b), where a is the string at the beginning of the command, and b is a dictionary of name, value pairs for the command. |
check(self)Raise an error if terminal was closed, otherwise do nothing. |
check_message(self, kwargs)Raises an error if kwargs['RESULT'] != 'OK'. |
close(self)Close the SAM terminal. |
on_message(self, msg, kwargs)Process a SAM message that was received. Dispatch to self._on_MESSAGE_NAME(**kwargs). |
queue_get(self, q)Identical to q.get() unless a call to self.check() fails, in which case the waiting is cut short with an error. |
send_message(self, msg)Send a message to the SAM bridge. A newline will be automatically added if none is present. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Mon Aug 02 01:07:41 2004 | http://epydoc.sf.net |